package com.cq.mapper;

import com.cq.pojo.Permission;
import com.cq.pojo.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: 悠久的苍穹
 * @Date: 2021/2/7 18:13
 * @Description: 权限数据层
 * @Version: 1.0
 */
@Mapper
@Repository
public interface PermissionMapper {


    List<Permission> findPermissionByRole(Role role);

    List<Permission> getPermissions();

    List<Permission> getPermissionsById(@Param("id") Integer id);

    void deletePermission(@Param("role_id") String role_id);

    void addPermission(@Param("role_id") String role_id, @Param("id") int id);
}
